import request from '../utils/request'

export const getConsUnit = () => {
  return request.get('system/project/consUnits')
}

export const getProjectLists = (projectSearchDTO) => {
  return request.post('system/project/infoList', projectSearchDTO)
}

export const getProjectCount = (projectSearchDTO) => {
  return request.post('system/project/infoListCount', projectSearchDTO)
}

export const addProject = (projectDTO) => {
  return request.post('system/project/addProject', projectDTO)
}

export const editProject = (projectDTO) => {
  return request.post('/system/project/editProject', projectDTO, { params: { projectId: projectDTO.projectId } })
}

export const removeProject = (projectId) => {
  return request.post('system/project/removeProject', {}, {
    params: {
      projectId
    }
  })
}
